<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>审核界面</title>
    <link th:href="@{/layui/css/layui.css}" rel="stylesheet"/>
    <link th:href="@{/css/tool.css}" rel="stylesheet"/>
    <script src="/layui/layui.js" charset="utf-8"></script>
</head>
<body>
<input type="hidden" th:value="${tbId}" id="tbId">
<input type="hidden" th:value="${zbId}" id="zbId">
<div>
    <div class="headTitle">
        审核操作
    </div>
    <div class="aniu">
        <button id="pass">通过</button>
        <button id="notPass">不通过</button>
    </div>
</div>

<script>
    layui.use(['layer','jquery'],function () {

        var index = parent.layer.getFrameIndex(window.name);
        var layer = layui.layer
             $ = layui.$;

            $('#pass').click(function () {
               $.ajax({
                   type : "GET",
                   url : "/shStatus",
                   data : {
                       status : 1,
                       tbId : $("#tbId").val(),
                       zbId : $("#zbId").val()
                   }
               });

                parent.layer.close(index);
                parent.location.reload()
            })

        $('#notPass').click(function () {
            $.ajax({
                type : "GET",
                url : "/shStatus",
                data : {
                    status : 2,
                    tbId : $("#tbId").val(),
                    zbId : $("#zbId").val()
                }
            })

            parent.layer.close(index);
            parent.location.reload()
        })

    })
</script>
</body>
</html>